use tklog::{sync::Logger, Format, LEVEL};

pub fn log_init() {
    let mut log = Logger::new();
    log.set_console(true)
        .set_level(LEVEL::Info)
        .set_format(Format::LevelFlag | Format::Time | Format::ShortFileName)
        .set_cutmode_by_size("tklogsize.txt", 1 << 20, 10, true)
        .set_formatter("{level}{time} {file}:{message}\n");
}
